Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in the README.md for kmer.scala example, need to get rdd first. #1032

Closed

Conversation

InvisibleTech
Copy link
Contributor

When I ran the example from the README for kmer.scala I received errors trying to flatMap:

error: value flatMap is not a member of org.bdgenomics.adam.rdd.read.AlignmentRecordRDD

By using .rdd:

reads.rdd.flatMap(_.getSequence.sliding(21).map(k => (k, 1L)))....
It works.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@fnothaft
Copy link
Member

Jenkins, test this please.

@fnothaft
Copy link
Member

Thanks for the patch, @InvisibleTech! We've just made that API change recently and forgot to patch the docs, so thank you for updating the docs after you ran into the issue!

@AmplabJenkins
Copy link

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/ADAM-prb/1230/
Test PASSed.

@heuermh
Copy link
Member

heuermh commented May 13, 2016

@fnothaft shouldn't the implicit take care of this?

@fnothaft
Copy link
Member

@heuermh good point, I was just thinking that. I think the correct approach would be to add the implicit conversion. We just import import org.bdgenomics.adam.rdd.ADAMContext, not import org.bdgenomics.adam.rdd.ADAMContext._

@InvisibleTech
Copy link
Contributor Author

Got it... I ran the example with the wildcard implicit and it works. Though... not sure if this a Spark 1.6 or OSX Spark thing but if you don't end the code lines for the val kmers = .... line you end up with spark shell errors running the kmer.scala sample. I'll post a new PR for this. thanks for the review... who'd have thought a README review could be so useful.

@InvisibleTech
Copy link
Contributor Author

Please see #1033 for my better fix per your suggestion.

@heuermh
Copy link
Member

heuermh commented May 18, 2016

Closing in favor of #1033, thanks!

@heuermh heuermh closed this May 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants